<template>
  <div class="product-video" id="productvideo">
      <Slideshow></Slideshow>
      <div class="center">
            <div class="header">
                    <h3>功能视频展示</h3>
                    <span class="bules"></span>
                    <span class="long"></span>
            </div>
            <div class="video-list">
                <ul>
                  <li v-for="(productvideolist, index) in this.productVideo" :key="index" @mouseover="wordsColor(index)" @mouseout="wordsColor_1(index)">
                    <router-link :to="{name:'VideoPage',params:{id:productvideolist.id}}">
                      <img :src="productvideolist.cover" alt="视频图片">
                      <img src="/home/static/imgs/video.png" alt="" class="center-img">
                    </router-link>
                    <router-link :to="{name:'VideoPage',params:{id:productvideolist.id}}" >
                      <p class="titles">{{productvideolist.title}}</p>
                    </router-link>
                    <span></span>
                  </li>
                 
                </ul>
            </div>
       </div>
      <Footer></Footer>  
  </div>
</template>
<script>
import Slideshow from '../../common/Slideshow'
import Footer from "../../common/Footer"
export default {
  name: 'ProductVideo',
  data(){
      return{
        productVideo: []
      }
  },
  components: {
      Footer,
      Slideshow
  },
  created(){
      var node = this;
      window.$.get(this.apiUrl+'/articles/index',{
        category:3,
        per_page: 6,
        page:1
    }, function (res) {
          node.productVideo = res.data
      })
  },
  methods: {
    wordsColor(index){
      let words = document.getElementsByClassName("titles")[index];
      words.style.color = '#009ae9';
    },
    wordsColor_1(index){
       let words = document.getElementsByClassName("titles")[index];
       words.style.color = '#000';
    }
  }
}
</script>
<style scoped>
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
button,
textarea,
p,
blockquote,
th,
td {
  overflow: hidden;
}
.product-video{
   width: 100%;
   height: auto;
 }
.product-video .center{
  width: 1234px;
  height: auto;
  margin: 50px auto 160px;
}
.product-video .center .header{
  width: 1280px;
  height: 54px;
  position: relative;
}
.product-video .center .header h3{
  width: 100%;
  height: 38px;
  font-size: 36px;
  color: #110567;
  line-height: 38px;
}
.product-video .center .header .bules{
  display: inline-block;
  width: 216px;
  border-top: 3px solid #009ae9;
  margin-top: 7px;
}
.product-video .center .header .long{
  display: inline-block;
  width: 1200px;
  border-top: 1px solid #e8e8e8;
  position: absolute;
  bottom: 0;
}
.product-video .center .video-list{
    margin-top: 36px;
    width: 1280px;
    height: auto;
}
.product-video .center .video-list li{
  width: 377px;
  height: auto;
  display: inline-block;
  margin-top: 80px;
  text-align: center;
  margin-left: 60px;
  position: relative;
}
.product-video .center .video-list li:nth-child(1),.product-video .center .video-list li:nth-child(2),.product-video .center .video-list li:nth-child(3){
  margin-top: 0;
}
.product-video .center .video-list li:nth-child(1),.product-video .center .video-list li:nth-child(4),.product-video .center .video-list li:nth-child(7),.product-video .center .video-list li:nth-child(10),.product-video .center .video-list li:nth-child(13),.product-video .center .video-list li:nth-child(16){
  margin-left: 0;
}
.product-video .center .video-list li a{
  width: 360px;
  height: 230px;
  position: relative;
  display: inline-block;
}
.product-video .center .video-list li img{
  width: 360px;
  height: 230px;
}
.product-video .center .video-list li .center-img{
  width: 40px;
  height: 40px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
}
.product-video .center .video-list li p{
  width: 100%;
  height: 30px;
  color: #000;
  font-size: 24px;
  margin-top: 10px;
}
.product-video .center .video-list li a{
  text-decoration: none;
}
.product-video .center .video-list li a:nth-child(2){
  height: auto;
}
.product-video .center .video-list li span{
  position: absolute;
  top: center;
  left: center;
  right: center;
  bottom: center;
  display: inline-block;
  background: url("/home/static/imgs/video.png") no-repeat;
}
</style>
